package com.lgl.enums;

public enum AppHttpCodeEnum {
    // 成功
    SUCCESS(200,"操作成功"),
    ARTICLE_ERROR(500,"文章标题丶标签丶文章内容丶分类丶必须不能为空"),
    // 登录
    NEED_LOGIN(401,"需要登录后操作"),
    CONTENT_NOT_NULL(506,"评论不能为空"),
    NO_OPERATOR_AUTH(403,"无权限操作"),
    SYSTEM_ERROR(500,"出现错误"),
    UPDATE_MENU_ERROR(500,"修改失败，上级菜单不能为自己"),
    SUBMENU_EXISTS(500,"存在子菜单不允许删除"),
    USERNAME_EXIST(501,"用户名已存在"),
     PHONENUMBER_EXIST(502,"手机号已存在"), EMAIL_EXIST(503, "邮箱已存在"),
    REQUIRE_USERNAME(504, "必需填写用户名"),
    FILE_TYPE_ERROR(503,"文件类型错误，请使用png或jpg的文件"),
    LOGIN_ERROR(505,"用户名或密码错误"),
    USERNAME_NOT_NULL(507,"用户名不能为空"),
    NICKNAME_NOT_NULL(508,"昵称不能为空"),
    NICKNAME_EXIST(511,"昵称已存在"),
    EMAIL_NOT_NULL(509,"邮箱不能为空"),
    PASSWORD_NOT_NULL(510,"密码不能为空");


    int code;
    String msg;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.msg = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
